<?php

class Application_Form_FrmCreateSchedule extends Zend_Form
{

    public function init()
    {
        /* Form Elements & Other Definitions Here ... */
    }
	function frmSchedule(){
		$db = new Application_Model_DbTable_DbGlobal();
		
		$academic_year = new Zend_Form_Element_Text("academic_year");
		$academic_year->setAttribs(array("class"=>"form-control hasDatepicker"));
		
		$level = new Zend_Form_Element_Select("level");
		$opt_level = array(0=>"Please Select Level",1=>"Bachelor Degree",2=>"Associate Degree");
		$level->setMultiOptions($opt_level);
		$level->setValue(0);
		
		$rowsRoom= $db->getGlobalDb('SELECT 
									  r.room_id,
									  r.room_name,
									  f.`floor` 
									FROM
									  tbl_room AS r,
									  tbl_floor AS f 
									WHERE room_name != "" 
									  AND r.`floor_id` = f.`floor_id` 
									ORDER BY room_id ASC ');
		$option_room = array(""=>"--Please Select Room--");
		if($rowsRoom) {
			foreach($rowsRoom as $readRoom) $option_room[$readRoom['room_id']]=$readRoom['room_name']."(".$readRoom['floor'].")";
		}
		$room_pri = new Zend_Form_Element_Select("room_pri");
		$room_pri->setMultiOptions($option_room);
		$room_pri->setAttribs(array("class"=>"form-control"));
		$room_pri->setValue(0);
		
		$year = new Zend_Form_Element_Select("year");
		$opt_year = array(0=>"Please Select Year",1=>"Year I",2=>"Year II",3=>"Year III",4=>"Year IV");
		$year->setMultiOptions($opt_year);
		$year->setValue(0);
		$year->setAttribs(array("class"=>"form-control" ,"onChange"=>"getSubjectFilter();"));
		
		$semester = new Zend_Form_Element_Select("semester");
		$opt_semster= array(0=>"Pleasse Select Semester",1=>"Semster I",2=>"Semster II");
		$semester->setMultiOptions($opt_semster);
		$semester->setValue(0);
		$semester->setAttribs(array("class"=>"form-control"));
		
		$session = new Zend_Form_Element_Select("session");
		$opt_session = array(0=>"Please Select Session",1=>"Morning",2=>"After noon",3=>"Evening",4=>"Weekend");
		$session->setMultiOptions($opt_session);
		$session->setValue(0);
		$session->setAttribs(array("class"=>"form-control"));
		
		$rowsSubject= $db->getGlobalDb('SELECT 
									  s.`subject_id`,
									  s.`subject_name` 
									FROM
									  tbl_subject AS s,
									  tbl_departments AS dpt 
									WHERE s.`dpt_id` = dpt.`dpt_id`
									  AND dpt.`dpt_id`=5
									  AND s.`year_id` = 1
									  AND s.`semestr_id`=1 ');
		$option_subject = array(0=>"Please Select Subject");
		if($rowsSubject) {
			foreach($rowsSubject as $readsubject) $option_subject[$readsubject['subject_id']]=$readsubject['subject_name'];
		}
		//monday
		$subject_mon_7_8= new Zend_Form_Element_Select("subject_mon_7_8");
		$subject_mon_7_8->setMultiOptions($option_subject);
		$subject_mon_7_8->setValue(0);
		$subject_mon_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_mon_7_8);
		
		$subject_mon_8_10= new Zend_Form_Element_Select("subject_mon_8_10");
		$subject_mon_8_10->setMultiOptions($option_subject);
		$subject_mon_8_10->setValue(0);
		$subject_mon_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_mon_8_10);
		
		$subject_mon_10_12= new Zend_Form_Element_Select("subject_mon_10_12");
		$subject_mon_10_12->setMultiOptions($option_subject);
		$subject_mon_10_12->setValue(0);
		$subject_mon_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_mon_10_12);
		
		$subject_mon_1_2= new Zend_Form_Element_Select("subject_mon_1_2");
		$subject_mon_1_2->setMultiOptions($option_subject);
		$subject_mon_1_2->setValue(0);
		$subject_mon_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_mon_1_2);
		
		$subject_mon_2_4= new Zend_Form_Element_Select("subject_mon_2_4");
		$subject_mon_2_4->setMultiOptions($option_subject);
		$subject_mon_2_4->setValue(0);
		$subject_mon_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_mon_2_4);
		
		$subject_mon_4_5= new Zend_Form_Element_Select("subject_mon_4_5");
		$subject_mon_4_5->setMultiOptions($option_subject);
		$subject_mon_4_5->setValue(0);
		$subject_mon_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_mon_4_5);
		
		$subject_mon_5_7= new Zend_Form_Element_Select("subject_mon_5_7");
		$subject_mon_5_7->setMultiOptions($option_subject);
		$subject_mon_5_7->setValue(0);
		$subject_mon_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_mon_5_7);
		
		$subject_mon_7_8_1= new Zend_Form_Element_Select("subject_mon_7_8_1");
		$subject_mon_7_8_1->setMultiOptions($option_subject);
		$subject_mon_7_8_1->setValue(0);
		$subject_mon_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_mon_7_8_1);
		
		//tuesday
		
		$subject_tue_7_8= new Zend_Form_Element_Select("subject_tue_7_8");
		$subject_tue_7_8->setMultiOptions($option_subject);
		$subject_tue_7_8->setValue(0);
		$subject_tue_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_tue_7_8);
		
		$subject_tue_8_10= new Zend_Form_Element_Select("subject_tue_8_10");
		$subject_tue_8_10->setMultiOptions($option_subject);
		$subject_tue_8_10->setValue(0);
		$subject_tue_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_tue_8_10);
		
		$subject_tue_10_12= new Zend_Form_Element_Select("subject_tue_10_12");
		$subject_tue_10_12->setMultiOptions($option_subject);
		$subject_tue_10_12->setValue(0);
		$subject_tue_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_tue_10_12);
		
		$subject_tue_1_2= new Zend_Form_Element_Select("subject_tue_1_2");
		$subject_tue_1_2->setMultiOptions($option_subject);
		$subject_tue_1_2->setValue(0);
		$subject_tue_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_tue_1_2);
		
		$subject_tue_2_4= new Zend_Form_Element_Select("subject_tue_2_4");
		$subject_tue_2_4->setMultiOptions($option_subject);
		$subject_tue_2_4->setValue(0);
		$subject_tue_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_tue_2_4);
		
		$subject_tue_4_5= new Zend_Form_Element_Select("subject_tue_4_5");
		$subject_tue_4_5->setMultiOptions($option_subject);
		$subject_tue_4_5->setValue(0);
		$subject_tue_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_tue_4_5);
		
		$subject_tue_5_7= new Zend_Form_Element_Select("subject_tue_5_7");
		$subject_tue_5_7->setMultiOptions($option_subject);
		$subject_tue_5_7->setValue(0);
		$subject_tue_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_tue_5_7);
		
		$subject_tue_7_8_1= new Zend_Form_Element_Select("subject_tue_7_8_1");
		$subject_tue_7_8_1->setMultiOptions($option_subject);
		$subject_tue_7_8_1->setValue(0);
		$subject_tue_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_tue_7_8_1);
		
		//wednessday
		
		$subject_wed_7_8= new Zend_Form_Element_Select("subject_wed_7_8");
		$subject_wed_7_8->setMultiOptions($option_subject);
		$subject_wed_7_8->setValue(0);
		$subject_wed_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_wed_7_8);
		
		$subject_wed_8_10= new Zend_Form_Element_Select("subject_wed_8_10");
		$subject_wed_8_10->setMultiOptions($option_subject);
		$subject_wed_8_10->setValue(0);
		$subject_wed_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_wed_8_10);
		
		$subject_wed_10_12= new Zend_Form_Element_Select("subject_wed_10_12");
		$subject_wed_10_12->setMultiOptions($option_subject);
		$subject_wed_10_12->setValue(0);
		$subject_wed_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_wed_10_12);
		
		$subject_wed_1_2= new Zend_Form_Element_Select("subject_wed_1_2");
		$subject_wed_1_2->setMultiOptions($option_subject);
		$subject_wed_1_2->setValue(0);
		$subject_wed_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_wed_1_2);
		
		$subject_wed_2_4= new Zend_Form_Element_Select("subject_wed_2_4");
		$subject_wed_2_4->setMultiOptions($option_subject);
		$subject_wed_2_4->setValue(0);
		$subject_wed_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_wed_2_4);
		
		$subject_wed_4_5= new Zend_Form_Element_Select("subject_wed_4_5");
		$subject_wed_4_5->setMultiOptions($option_subject);
		$subject_wed_4_5->setValue(0);
		$subject_wed_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_wed_4_5);
		
		$subject_wed_5_7= new Zend_Form_Element_Select("subject_wed_5_7");
		$subject_wed_5_7->setMultiOptions($option_subject);
		$subject_wed_5_7->setValue(0);
		$subject_wed_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_wed_5_7);
		
		$subject_wed_7_8_1= new Zend_Form_Element_Select("subject_wed_7_8_1");
		$subject_wed_7_8_1->setMultiOptions($option_subject);
		$subject_wed_7_8_1->setValue(0);
		$subject_wed_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_wed_7_8_1);
		//thuesday
		
		$subject_thu_7_8= new Zend_Form_Element_Select("subject_thu_7_8");
		$subject_thu_7_8->setMultiOptions($option_subject);
		$subject_thu_7_8->setValue(0);
		$subject_thu_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_thu_7_8);
		
		$subject_thu_8_10= new Zend_Form_Element_Select("subject_thu_8_10");
		$subject_thu_8_10->setMultiOptions($option_subject);
		$subject_thu_8_10->setValue(0);
		$subject_thu_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_thu_8_10);
		
		$subject_thu_10_12= new Zend_Form_Element_Select("subject_thu_10_12");
		$subject_thu_10_12->setMultiOptions($option_subject);
		$subject_thu_10_12->setValue(0);
		$subject_thu_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_thu_10_12);
		
		$subject_thu_1_2= new Zend_Form_Element_Select("subject_thu_1_2");
		$subject_thu_1_2->setMultiOptions($option_subject);
		$subject_thu_1_2->setValue(0);
		$subject_thu_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_thu_1_2);
		
		$subject_thu_2_4= new Zend_Form_Element_Select("subject_thu_2_4");
		$subject_thu_2_4->setMultiOptions($option_subject);
		$subject_thu_2_4->setValue(0);
		$subject_thu_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_thu_2_4);
		
		$subject_thu_4_5= new Zend_Form_Element_Select("subject_thu_4_5");
		$subject_thu_4_5->setMultiOptions($option_subject);
		$subject_thu_4_5->setValue(0);
		$subject_thu_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_thu_4_5);
		
		$subject_thu_5_7= new Zend_Form_Element_Select("subject_thu_5_7");
		$subject_thu_5_7->setMultiOptions($option_subject);
		$subject_thu_5_7->setValue(0);
		$subject_thu_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_thu_5_7);
		
		$subject_thu_7_8_1= new Zend_Form_Element_Select("subject_thu_7_8_1");
		$subject_thu_7_8_1->setMultiOptions($option_subject);
		$subject_thu_7_8_1->setValue(0);
		$subject_thu_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_thu_7_8_1);
		//friday
		
		$subject_fri_7_8= new Zend_Form_Element_Select("subject_fri_7_8");
		$subject_fri_7_8->setMultiOptions($option_subject);
		$subject_fri_7_8->setValue(0);
		$subject_fri_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_fri_7_8);
		
		$subject_fri_8_10= new Zend_Form_Element_Select("subject_fri_8_10");
		$subject_fri_8_10->setMultiOptions($option_subject);
		$subject_fri_8_10->setValue(0);
		$subject_fri_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_fri_8_10);
		
		$subject_fri_10_12= new Zend_Form_Element_Select("subject_fri_10_12");
		$subject_fri_10_12->setMultiOptions($option_subject);
		$subject_fri_10_12->setValue(0);
		$subject_fri_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_fri_10_12);
		
		$subject_fri_1_2= new Zend_Form_Element_Select("subject_fri_1_2");
		$subject_fri_1_2->setMultiOptions($option_subject);
		$subject_fri_1_2->setValue(0);
		$subject_fri_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_fri_1_2);
		
		$subject_fri_2_4= new Zend_Form_Element_Select("subject_fri_2_4");
		$subject_fri_2_4->setMultiOptions($option_subject);
		$subject_fri_2_4->setValue(0);
		$subject_fri_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_fri_2_4);
		
		$subject_fri_4_5= new Zend_Form_Element_Select("subject_fri_4_5");
		$subject_fri_4_5->setMultiOptions($option_subject);
		$subject_fri_4_5->setValue(0);
		$subject_fri_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_fri_4_5);
		
		$subject_fri_5_7= new Zend_Form_Element_Select("subject_fri_5_7");
		$subject_fri_5_7->setMultiOptions($option_subject);
		$subject_fri_5_7->setValue(0);
		$subject_fri_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_fri_5_7);
		
		$subject_fri_7_8_1= new Zend_Form_Element_Select("subject_fri_7_8_1");
		$subject_fri_7_8_1->setMultiOptions($option_subject);
		$subject_fri_7_8_1->setValue(0);
		$subject_fri_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_fri_7_8_1);
		
		//sutday
		$subject_sat_7_8= new Zend_Form_Element_Select("subject_sat_7_8");
		$subject_sat_7_8->setMultiOptions($option_subject);
		$subject_sat_7_8->setValue(0);
		$subject_sat_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sat_7_8);
		
		$subject_sat_8_10= new Zend_Form_Element_Select("subject_sat_8_10");
		$subject_sat_8_10->setMultiOptions($option_subject);
		$subject_sat_8_10->setValue(0);
		$subject_sat_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sat_8_10);
		
		$subject_sat_10_12= new Zend_Form_Element_Select("subject_sat_10_12");
		$subject_sat_10_12->setMultiOptions($option_subject);
		$subject_sat_10_12->setValue(0);
		$subject_sat_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sat_10_12);
		
		$subject_sat_1_2= new Zend_Form_Element_Select("subject_sat_1_2");
		$subject_sat_1_2->setMultiOptions($option_subject);
		$subject_sat_1_2->setValue(0);
		$subject_sat_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sat_1_2);
		
		$subject_sat_2_4= new Zend_Form_Element_Select("subject_sat_2_4");
		$subject_sat_2_4->setMultiOptions($option_subject);
		$subject_sat_2_4->setValue(0);
		$subject_sat_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sat_2_4);
		
		$subject_sat_4_5= new Zend_Form_Element_Select("subject_sat_4_5");
		$subject_sat_4_5->setMultiOptions($option_subject);
		$subject_sat_4_5->setValue(0);
		$subject_sat_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sat_4_5);
		
		$subject_sat_5_7= new Zend_Form_Element_Select("subject_sat_5_7");
		$subject_sat_5_7->setMultiOptions($option_subject);
		$subject_sat_5_7->setValue(0);
		$subject_sat_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sat_5_7);
		
		$subject_sat_7_8_1= new Zend_Form_Element_Select("subject_sat_7_8_1");
		$subject_sat_7_8_1->setMultiOptions($option_subject);
		$subject_sat_7_8_1->setValue(0);
		$subject_sat_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sat_7_8_1);
		
		//sunday
		$subject_sun_7_8= new Zend_Form_Element_Select("subject_sun_7_8");
		$subject_sun_7_8->setMultiOptions($option_subject);
		$subject_sun_7_8->setValue(0);
		$subject_sun_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sun_7_8);
		
		$subject_sun_8_10= new Zend_Form_Element_Select("subject_sun_8_10");
		$subject_sun_8_10->setMultiOptions($option_subject);
		$subject_sun_8_10->setValue(0);
		$subject_sun_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sun_8_10);
		
		$subject_sun_10_12= new Zend_Form_Element_Select("subject_sun_10_12");
		$subject_sun_10_12->setMultiOptions($option_subject);
		$subject_sun_10_12->setValue(0);
		$subject_sun_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sun_10_12);
		
		$subject_sun_1_2= new Zend_Form_Element_Select("subject_sun_1_2");
		$subject_sun_1_2->setMultiOptions($option_subject);
		$subject_sun_1_2->setValue(0);
		$subject_sun_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sun_1_2);
		
		$subject_sun_2_4= new Zend_Form_Element_Select("subject_sun_2_4");
		$subject_sun_2_4->setMultiOptions($option_subject);
		$subject_sun_2_4->setValue(0);
		$subject_sun_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sun_2_4);
		
		$subject_sun_4_5= new Zend_Form_Element_Select("subject_sun_4_5");
		$subject_sun_4_5->setMultiOptions($option_subject);
		$subject_sun_4_5->setValue(0);
		$subject_sun_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sun_4_5);
		
		$subject_sun_5_7= new Zend_Form_Element_Select("subject_sun_5_7");
		$subject_sun_5_7->setMultiOptions($option_subject);
		$subject_sun_5_7->setValue(0);
		$subject_sun_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sun_5_7);
		
		$subject_sun_7_8_1= new Zend_Form_Element_Select("subject_sun_7_8_1");
		$subject_sun_7_8_1->setMultiOptions($option_subject);
		$subject_sun_7_8_1->setValue(0);
		$subject_sun_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($subject_sun_7_8_1);
		
		//teacher by time day
		
		$rowsTeacher_mon_7_8= $db->getGlobalDb('SELECT 
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id` 
										  AND tin.`dpt_id` = 5 
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=1
										  AND tadt.`time_id`=1');
		$option_teacher_mon_7_8 = array(""=>"Please Select Subject");
		if($rowsTeacher_mon_7_8) {
			foreach($rowsTeacher_mon_7_8 as $teacher_mon_7_8) $option_teacher_mon_7_8[$teacher_mon_7_8['teacher_id']]=$teacher_mon_7_8['teacher_name'];
		}
		$teacher_mon_7_8 = new Zend_Form_Element_Select("teacher_mon_7_8");
		$teacher_mon_7_8->setMultiOptions($option_teacher_mon_7_8);
		$teacher_mon_7_8->setValue(0);
		$teacher_mon_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_mon_7_8);
		
		$rowsTeacher_mon_8_10= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=1
										  AND tadt.`time_id`=2');
		$option_teacher_mon_8_10 = array(""=>"Please Select Subject");
		if($rowsTeacher_mon_8_10) {
			foreach($rowsTeacher_mon_8_10 as $teacher_mon_8_10) $option_teacher_mon_8_10[$teacher_mon_8_10['teacher_id']]=$teacher_mon_8_10['teacher_name'];
		}
		$teacher_mon_8_10 = new Zend_Form_Element_Select("teacher_mon_8_10");
		$teacher_mon_8_10->setMultiOptions($option_teacher_mon_8_10);
		$teacher_mon_8_10->setValue(0);
		$teacher_mon_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_mon_8_10);
		
		$rowsTeacher_mon_10_12= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=1
										  AND tadt.`time_id`=3');
		$option_teacher_mon_10_12 = array(""=>"Please Select Subject");
		if($rowsTeacher_mon_10_12) {
			foreach($rowsTeacher_mon_10_12 as $teacher_mon_10_12) $option_teacher_mon_10_12[$teacher_mon_10_12['teacher_id']]=$teacher_mon_10_12['teacher_name'];
		}
		$teacher_mon_10_12 = new Zend_Form_Element_Select("teacher_mon_10_12");
		$teacher_mon_10_12->setMultiOptions($option_teacher_mon_10_12);
		$teacher_mon_10_12->setValue(0);
		$teacher_mon_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_mon_10_12);
		
		
		$rowsTeacher_mon_1_2= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=1
										  AND tadt.`time_id`=4');
		$option_teacher_mon_1_2 = array(""=>"Please Select Subject");
		if($rowsTeacher_mon_1_2) {
			foreach($rowsTeacher_mon_1_2 as $teacher_mon_1_2) $option_teacher_mon_1_2[$teacher_mon_1_2['teacher_id']]=$teacher_mon_1_2['teacher_name'];
		}
		$teacher_mon_1_2 = new Zend_Form_Element_Select("teacher_mon_1_2");
		$teacher_mon_1_2->setMultiOptions($option_teacher_mon_1_2);
		$teacher_mon_1_2->setValue(0);
		$teacher_mon_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_mon_1_2);
		
		$rowsTeacher_mon_2_4= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=1
										  AND tadt.`time_id`=5');
		$option_teacher_mon_2_4 = array(""=>"Please Select Subject");
		if($rowsTeacher_mon_2_4) {
			foreach($rowsTeacher_mon_2_4 as $teacher_mon_2_4) $option_teacher_mon_2_4[$teacher_mon_2_4['teacher_id']]=$teacher_mon_2_4['teacher_name'];
		}
		$teacher_mon_2_4 = new Zend_Form_Element_Select("teacher_mon_2_4");
		$teacher_mon_2_4->setMultiOptions($option_teacher_mon_2_4);
		$teacher_mon_2_4->setValue(0);
		$teacher_mon_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_mon_2_4);
		
		$rowsTeacher_mon_4_5= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=1
										  AND tadt.`time_id`=6');
		$option_teacher_mon_4_5 = array(""=>"Please Select Subject");
		if($rowsTeacher_mon_4_5) {
			foreach($rowsTeacher_mon_4_5 as $teacher_mon_4_5) $option_teacher_mon_4_5[$teacher_mon_4_5['teacher_id']]=$teacher_mon_4_5['teacher_name'];
		}
		$teacher_mon_4_5 = new Zend_Form_Element_Select("teacher_mon_4_5");
		$teacher_mon_4_5->setMultiOptions($option_teacher_mon_4_5);
		$teacher_mon_4_5->setValue(0);
		$teacher_mon_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_mon_4_5);
		
		$rowsTeacher_mon_5_7= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=1
										  AND tadt.`time_id`=7');
		$option_teacher_mon_5_7 = array(""=>"Please Select Subject");
		if($rowsTeacher_mon_5_7) {
			foreach($rowsTeacher_mon_5_7 as $teacher_mon_5_7) $option_teacher_mon_5_7[$teacher_mon_5_7['teacher_id']]=$teacher_mon_5_7['teacher_name'];
		}
		$teacher_mon_5_7 = new Zend_Form_Element_Select("teacher_mon_5_7");
		$teacher_mon_5_7->setMultiOptions($option_teacher_mon_5_7);
		$teacher_mon_5_7->setValue(0);
		$teacher_mon_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_mon_5_7);
		
		$rowsTeacher_mon_7_8_1= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=1
										  AND tadt.`time_id`=8');
		$option_teacher_mon_7_8_1 = array(""=>"Please Select Subject");
		if($rowsTeacher_mon_7_8_1) {
			foreach($rowsTeacher_mon_7_8_1 as $teacher_mon_7_8_1) $option_teacher_mon_7_8_1[$teacher_mon_7_8_1['teacher_id']]=$teacher_mon_7_8_1['teacher_name'];
		}
		$teacher_mon_7_8_1 = new Zend_Form_Element_Select("teacher_mon_7_8_1");
		$teacher_mon_7_8_1->setMultiOptions($option_teacher_mon_7_8_1);
		$teacher_mon_7_8_1->setValue(0);
		$teacher_mon_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_mon_7_8_1);
		
		// tuesday 
		
		$rowsTeacher_tue_7_8= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=2
										  AND tadt.`time_id`=1');
		$option_teacher_tue_7_8 = array(""=>"Please Select Subject");
		if($rowsTeacher_tue_7_8) {
			foreach($rowsTeacher_tue_7_8 as $teacher_tue_7_8) $option_teacher_tue_7_8[$teacher_tue_7_8['teacher_id']]=$teacher_tue_7_8['teacher_name'];
		}
		$teacher_tue_7_8 = new Zend_Form_Element_Select("teacher_tue_7_8");
		$teacher_tue_7_8->setMultiOptions($option_teacher_tue_7_8);
		$teacher_tue_7_8->setValue(0);
		$teacher_tue_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_tue_7_8);
		
		$rowsTeacher_tue_8_10= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=2
										  AND tadt.`time_id`=2');
		$option_teacher_tue_8_10 = array(""=>"Please Select Subject");
		if($rowsTeacher_tue_8_10) {
			foreach($rowsTeacher_tue_8_10 as $teacher_tue_8_10) $option_teacher_tue_8_10[$teacher_tue_8_10['teacher_id']]=$teacher_tue_8_10['teacher_name'];
		}
		$teacher_tue_8_10 = new Zend_Form_Element_Select("teacher_tue_8_10");
		$teacher_tue_8_10->setMultiOptions($option_teacher_tue_8_10);
		$teacher_tue_8_10->setValue(0);
		$teacher_tue_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_tue_8_10);
		
		$rowsTeacher_tue_10_12= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=2
										  AND tadt.`time_id`=3');
		$option_teacher_tue_10_12 = array(""=>"Please Select Subject");
		if($rowsTeacher_tue_10_12) {
			foreach($rowsTeacher_tue_10_12 as $teacher_tue_10_12) $option_teacher_tue_10_12[$teacher_tue_10_12['teacher_id']]=$teacher_tue_10_12['teacher_name'];
		}
		$teacher_tue_10_12 = new Zend_Form_Element_Select("teacher_tue_10_12");
		$teacher_tue_10_12->setMultiOptions($option_teacher_tue_10_12);
		$teacher_tue_10_12->setValue(0);
		$teacher_tue_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_tue_10_12);
		
		
		$rowsTeacher_tue_1_2= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=2
										  AND tadt.`time_id`=4');
		$option_teacher_tue_1_2 = array(""=>"Please Select Subject");
		if($rowsTeacher_tue_1_2) {
			foreach($rowsTeacher_tue_1_2 as $teacher_tue_1_2) $option_teacher_tue_1_2[$teacher_tue_1_2['teacher_id']]=$teacher_tue_1_2['teacher_name'];
		}
		$teacher_tue_1_2 = new Zend_Form_Element_Select("teacher_tue_1_2");
		$teacher_tue_1_2->setMultiOptions($option_teacher_tue_1_2);
		$teacher_tue_1_2->setValue(0);
		$teacher_tue_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_tue_1_2);
		
		$rowsTeacher_tue_2_4= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=2
										  AND tadt.`time_id`=5');
		$option_teacher_tue_2_4 = array(""=>"Please Select Subject");
		if($rowsTeacher_tue_2_4) {
			foreach($rowsTeacher_tue_2_4 as $teacher_tue_2_4) $option_teacher_tue_2_4[$teacher_tue_2_4['teacher_id']]=$teacher_tue_2_4['teacher_name'];
		}
		$teacher_tue_2_4 = new Zend_Form_Element_Select("teacher_tue_2_4");
		$teacher_tue_2_4->setMultiOptions($option_teacher_tue_2_4);
		$teacher_tue_2_4->setValue(0);
		$teacher_tue_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_tue_2_4);
		
		$rowsTeacher_tue_4_5= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=2
										  AND tadt.`time_id`=6');
		$option_teacher_tue_4_5 = array(""=>"Please Select Subject");
		if($rowsTeacher_tue_4_5) {
			foreach($rowsTeacher_tue_4_5 as $teacher_tue_4_5) $option_teacher_tue_4_5[$teacher_tue_4_5['teacher_id']]=$teacher_tue_4_5['teacher_name'];
		}
		$teacher_tue_4_5 = new Zend_Form_Element_Select("teacher_tue_4_5");
		$teacher_tue_4_5->setMultiOptions($option_teacher_tue_4_5);
		$teacher_tue_4_5->setValue(0);
		$teacher_tue_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_tue_4_5);
		
		$rowsTeacher_tue_5_7= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=2
										  AND tadt.`time_id`=7');
		$option_teacher_tue_5_7 = array(""=>"Please Select Subject");
		if($rowsTeacher_tue_5_7) {
			foreach($rowsTeacher_tue_5_7 as $teacher_tue_5_7) $option_teacher_tue_5_7[$teacher_tue_5_7['teacher_id']]=$teacher_tue_5_7['teacher_name'];
		}
		$teacher_tue_5_7 = new Zend_Form_Element_Select("teacher_tue_5_7");
		$teacher_tue_5_7->setMultiOptions($option_teacher_tue_5_7);
		$teacher_tue_5_7->setValue(0);
		$teacher_tue_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_tue_5_7);
		
		$rowsTeacher_tue_7_8_1= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=2
										  AND tadt.`time_id`=8');
		$option_teacher_tue_7_8_1 = array(""=>"Please Select Subject");
		if($rowsTeacher_tue_7_8_1) {
			foreach($rowsTeacher_tue_7_8_1 as $teacher_tue_7_8_1) $option_teacher_tue_7_8_1[$teacher_tue_7_8_1['teacher_id']]=$teacher_tue_7_8_1['teacher_name'];
		}
		$teacher_tue_7_8_1 = new Zend_Form_Element_Select("teacher_tue_7_8_1");
		$teacher_tue_7_8_1->setMultiOptions($option_teacher_tue_7_8_1);
		$teacher_tue_7_8_1->setValue(0);
		$teacher_tue_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_tue_7_8_1);
		
		// wednessday 
		
		$rowsTeacher_wed_7_8= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=3
										  AND tadt.`time_id`=1');
		$option_teacher_wed_7_8 = array(""=>"Please Select Subject");
		if($rowsTeacher_wed_7_8) {
			foreach($rowsTeacher_wed_7_8 as $teacher_wed_7_8) $option_teacher_wed_7_8[$teacher_wed_7_8['teacher_id']]=$teacher_wed_7_8['teacher_name'];
		}
		$teacher_wed_7_8 = new Zend_Form_Element_Select("teacher_wed_7_8");
		$teacher_wed_7_8->setMultiOptions($option_teacher_wed_7_8);
		$teacher_wed_7_8->setValue(0);
		$teacher_wed_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_wed_7_8);
		
		$rowsTeacher_wed_8_10= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=3
										  AND tadt.`time_id`=2');
		$option_teacher_wed_8_10 = array(""=>"Please Select Subject");
		if($rowsTeacher_wed_8_10) {
			foreach($rowsTeacher_wed_8_10 as $teacher_wed_8_10) $option_teacher_wed_8_10[$teacher_wed_8_10['teacher_id']]=$teacher_wed_8_10['teacher_name'];
		}
		$teacher_wed_8_10 = new Zend_Form_Element_Select("teacher_wed_8_10");
		$teacher_wed_8_10->setMultiOptions($option_teacher_wed_8_10);
		$teacher_wed_8_10->setValue(0);
		$teacher_wed_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_wed_8_10);
		
		$rowsTeacher_wed_10_12= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=3
										  AND tadt.`time_id`=3');
		$option_teacher_wed_10_12 = array(""=>"Please Select Subject");
		if($rowsTeacher_wed_10_12) {
			foreach($rowsTeacher_wed_10_12 as $teacher_wed_10_12) $option_teacher_wed_10_12[$teacher_wed_10_12['teacher_id']]=$teacher_wed_10_12['teacher_name'];
		}
		$teacher_wed_10_12 = new Zend_Form_Element_Select("teacher_wed_10_12");
		$teacher_wed_10_12->setMultiOptions($option_teacher_wed_10_12);
		$teacher_wed_10_12->setValue(0);
		$teacher_wed_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_wed_10_12);
		
		
		$rowsTeacher_wed_1_2= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=3
										  AND tadt.`time_id`=4');
		$option_teacher_wed_1_2 = array(""=>"Please Select Subject");
		if($rowsTeacher_wed_1_2) {
			foreach($rowsTeacher_wed_1_2 as $teacher_wed_1_2) $option_teacher_wed_1_2[$teacher_wed_1_2['teacher_id']]=$teacher_wed_1_2['teacher_name'];
		}
		$teacher_wed_1_2 = new Zend_Form_Element_Select("teacher_wed_1_2");
		$teacher_wed_1_2->setMultiOptions($option_teacher_wed_1_2);
		$teacher_wed_1_2->setValue(0);
		$teacher_wed_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_wed_1_2);
		
		$rowsTeacher_wed_2_4= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=3
										  AND tadt.`time_id`=5');
		$option_teacher_wed_2_4 = array(""=>"Please Select Subject");
		if($rowsTeacher_wed_2_4) {
			foreach($rowsTeacher_wed_2_4 as $teacher_wed_2_4) $option_teacher_wed_2_4[$teacher_wed_2_4['teacher_id']]=$teacher_wed_2_4['teacher_name'];
		}
		$teacher_wed_2_4 = new Zend_Form_Element_Select("teacher_wed_2_4");
		$teacher_wed_2_4->setMultiOptions($option_teacher_wed_2_4);
		$teacher_wed_2_4->setValue(0);
		$teacher_wed_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_wed_2_4);
		
		$rowsTeacher_wed_4_5= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=3
										  AND tadt.`time_id`=6');
		$option_teacher_wed_4_5 = array(""=>"Please Select Subject");
		if($rowsTeacher_wed_4_5) {
			foreach($rowsTeacher_wed_4_5 as $teacher_wed_4_5) $option_teacher_wed_4_5[$teacher_wed_4_5['teacher_id']]=$teacher_wed_4_5['teacher_name'];
		}
		$teacher_wed_4_5 = new Zend_Form_Element_Select("teacher_wed_4_5");
		$teacher_wed_4_5->setMultiOptions($option_teacher_wed_4_5);
		$teacher_wed_4_5->setValue(0);
		$teacher_wed_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_wed_4_5);
		
		$rowsTeacher_wed_5_7= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=3
										  AND tadt.`time_id`=7');
		$option_teacher_wed_5_7 = array(""=>"Please Select Subject");
		if($rowsTeacher_wed_5_7) {
			foreach($rowsTeacher_wed_5_7 as $teacher_wed_5_7) $option_teacher_wed_5_7[$teacher_wed_5_7['teacher_id']]=$teacher_wed_5_7['teacher_name'];
		}
		$teacher_wed_5_7 = new Zend_Form_Element_Select("teacher_wed_5_7");
		$teacher_wed_5_7->setMultiOptions($option_teacher_wed_5_7);
		$teacher_wed_5_7->setValue(0);
		$teacher_wed_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_wed_5_7);
		
		$rowsTeacher_wed_7_8_1= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=3
										  AND tadt.`time_id`=8');
		$option_teacher_wed_7_8_1 = array(""=>"Please Select Subject");
		if($rowsTeacher_wed_7_8_1) {
			foreach($rowsTeacher_wed_7_8_1 as $teacher_wed_7_8_1) $option_teacher_wed_7_8_1[$teacher_wed_7_8_1['teacher_id']]=$teacher_wed_7_8_1['teacher_name'];
		}
		$teacher_wed_7_8_1 = new Zend_Form_Element_Select("teacher_wed_7_8_1");
		$teacher_wed_7_8_1->setMultiOptions($option_teacher_wed_7_8_1);
		$teacher_wed_7_8_1->setValue(0);
		$teacher_wed_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_wed_7_8_1);
		
		// thurseday 
		$rowsTeacher_thu_7_8= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=4
										  AND tadt.`time_id`=1');
		$option_teacher_thu_7_8 = array(""=>"Please Select Subject");
		if($rowsTeacher_thu_7_8) {
			foreach($rowsTeacher_thu_7_8 as $teacher_thu_7_8) $option_teacher_thu_7_8[$teacher_thu_7_8['teacher_id']]=$teacher_thu_7_8['teacher_name'];
		}
		$teacher_thu_7_8 = new Zend_Form_Element_Select("teacher_thu_7_8");
		$teacher_thu_7_8->setMultiOptions($option_teacher_thu_7_8);
		$teacher_thu_7_8->setValue(0);
		$teacher_thu_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_thu_7_8);
		
		$rowsTeacher_thu_8_10= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=4
										  AND tadt.`time_id`=2');
		$option_teacher_thu_8_10 = array(""=>"Please Select Subject");
		if($rowsTeacher_thu_8_10) {
			foreach($rowsTeacher_thu_8_10 as $teacher_thu_8_10) $option_teacher_thu_8_10[$teacher_thu_8_10['teacher_id']]=$teacher_thu_8_10['teacher_name'];
		}
		$teacher_thu_8_10 = new Zend_Form_Element_Select("teacher_thu_8_10");
		$teacher_thu_8_10->setMultiOptions($option_teacher_thu_8_10);
		$teacher_thu_8_10->setValue(0);
		$teacher_thu_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_thu_8_10);
		
		$rowsTeacher_thu_10_12= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=4
										  AND tadt.`time_id`=3');
		$option_teacher_thu_10_12 = array(""=>"Please Select Subject");
		if($rowsTeacher_thu_10_12) {
			foreach($rowsTeacher_thu_10_12 as $teacher_thu_10_12) $option_teacher_thu_10_12[$teacher_thu_10_12['teacher_id']]=$teacher_thu_10_12['teacher_name'];
		}
		$teacher_thu_10_12 = new Zend_Form_Element_Select("teacher_thu_10_12");
		$teacher_thu_10_12->setMultiOptions($option_teacher_thu_10_12);
		$teacher_thu_10_12->setValue(0);
		$teacher_thu_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_thu_10_12);
		
		
		$rowsTeacher_thu_1_2= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=4
										  AND tadt.`time_id`=4');
		$option_teacher_thu_1_2 = array(""=>"Please Select Subject");
		if($rowsTeacher_thu_1_2) {
			foreach($rowsTeacher_thu_1_2 as $teacher_thu_1_2) $option_teacher_thu_1_2[$teacher_thu_1_2['teacher_id']]=$teacher_thu_1_2['teacher_name'];
		}
		$teacher_thu_1_2 = new Zend_Form_Element_Select("teacher_wed_1_2");
		$teacher_thu_1_2->setMultiOptions($option_teacher_thu_1_2);
		$teacher_thu_1_2->setValue(0);
		$teacher_thu_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_thu_1_2);
		
		$rowsTeacher_thu_2_4= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=4
										  AND tadt.`time_id`=5');
		$option_teacher_thu_2_4 = array(""=>"Please Select Subject");
		if($rowsTeacher_thu_2_4) {
			foreach($rowsTeacher_thu_2_4 as $teacher_thu_2_4) $option_teacher_thu_2_4[$teacher_thu_2_4['teacher_id']]=$teacher_thu_2_4['teacher_name'];
		}
		$teacher_thu_2_4 = new Zend_Form_Element_Select("teacher_thu_2_4");
		$teacher_thu_2_4->setMultiOptions($option_teacher_thu_2_4);
		$teacher_thu_2_4->setValue(0);
		$teacher_thu_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_thu_2_4);
		
		$rowsTeacher_thu_4_5= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=4
										  AND tadt.`time_id`=6');
		$option_teacher_thu_4_5 = array(""=>"Please Select Subject");
		if($rowsTeacher_thu_4_5) {
			foreach($rowsTeacher_thu_4_5 as $teacher_thu_4_5) $option_teacher_thu_4_5[$teacher_thu_4_5['teacher_id']]=$teacher_thu_4_5['teacher_name'];
		}
		$teacher_thu_4_5 = new Zend_Form_Element_Select("teacher_thu_4_5");
		$teacher_thu_4_5->setMultiOptions($option_teacher_thu_4_5);
		$teacher_thu_4_5->setValue(0);
		$teacher_thu_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_thu_4_5);
		
		$rowsTeacher_thu_5_7= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=4
										  AND tadt.`time_id`=7');
		$option_teacher_thu_5_7 = array(""=>"Please Select Subject");
		if($rowsTeacher_thu_5_7) {
			foreach($rowsTeacher_thu_5_7 as $teacher_thu_5_7) $option_teacher_thu_5_7[$teacher_thu_5_7['teacher_id']]=$teacher_thu_5_7['teacher_name'];
		}
		$teacher_thu_5_7 = new Zend_Form_Element_Select("teacher_thu_5_7");
		$teacher_thu_5_7->setMultiOptions($option_teacher_thu_5_7);
		$teacher_thu_5_7->setValue(0);
		$teacher_thu_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_thu_5_7);
		
		$rowsTeacher_thu_7_8_1= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=4
										  AND tadt.`time_id`=8');
		$option_teacher_thu_7_8_1 = array(""=>"Please Select Subject");
		if($rowsTeacher_thu_7_8_1) {
			foreach($rowsTeacher_thu_7_8_1 as $teacher_thu_7_8_1) $option_teacher_thu_7_8_1[$teacher_thu_7_8_1['teacher_id']]=$teacher_thu_7_8_1['teacher_name'];
		}
		$teacher_thu_7_8_1 = new Zend_Form_Element_Select("teacher_thu_7_8_1");
		$teacher_thu_7_8_1->setMultiOptions($option_teacher_thu_7_8_1);
		$teacher_thu_7_8_1->setValue(0);
		$teacher_thu_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_thu_7_8_1);
		
		// friday
		
		$rowsTeacher_fri_7_8= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=5
										  AND tadt.`time_id`=1');
		$option_teacher_fri_7_8 = array(""=>"Please Select Subject");
		if($rowsTeacher_fri_7_8) {
			foreach($rowsTeacher_fri_7_8 as $teacher_fri_7_8) $option_teacher_fri_7_8[$teacher_fri_7_8['teacher_id']]=$teacher_fri_7_8['teacher_name'];
		}
		$teacher_fri_7_8 = new Zend_Form_Element_Select("teacher_fri_7_8");
		$teacher_fri_7_8->setMultiOptions($option_teacher_fri_7_8);
		$teacher_fri_7_8->setValue(0);
		$teacher_fri_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_fri_7_8);
		
		$rowsTeacher_fri_8_10= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=5
										  AND tadt.`time_id`=2');
		$option_teacher_fri_8_10 = array(""=>"Please Select Subject");
		if($rowsTeacher_fri_8_10) {
			foreach($rowsTeacher_fri_8_10 as $teacher_fri_8_10) $option_teacher_fri_8_10[$teacher_fri_8_10['teacher_id']]=$teacher_fri_8_10['teacher_name'];
		}
		$teacher_fri_8_10 = new Zend_Form_Element_Select("teacher_fri_8_10");
		$teacher_fri_8_10->setMultiOptions($option_teacher_fri_8_10);
		$teacher_fri_8_10->setValue(0);
		$teacher_fri_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_fri_8_10);
		
		$rowsTeacher_fri_10_12= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=5
										  AND tadt.`time_id`=3');
		$option_teacher_fri_10_12 = array(""=>"Please Select Subject");
		if($rowsTeacher_fri_10_12) {
			foreach($rowsTeacher_fri_10_12 as $teacher_fri_10_12) $option_teacher_fri_10_12[$teacher_fri_10_12['teacher_id']]=$teacher_fri_10_12['teacher_name'];
		}
		$teacher_fri_10_12 = new Zend_Form_Element_Select("teacher_fri_10_12");
		$teacher_fri_10_12->setMultiOptions($option_teacher_fri_10_12);
		$teacher_fri_10_12->setValue(0);
		$teacher_fri_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_fri_10_12);
		
		
		$rowsTeacher_fri_1_2= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=5
										  AND tadt.`time_id`=4');
		$option_teacher_fri_1_2 = array(""=>"Please Select Subject");
		if($rowsTeacher_fri_1_2) {
			foreach($rowsTeacher_fri_1_2 as $teacher_fri_1_2) $option_teacher_fri_1_2[$teacher_fri_1_2['teacher_id']]=$teacher_fri_1_2['teacher_name'];
		}
		$teacher_fri_1_2 = new Zend_Form_Element_Select("teacher_fri_1_2");
		$teacher_fri_1_2->setMultiOptions($option_teacher_fri_1_2);
		$teacher_fri_1_2->setValue(0);
		$teacher_fri_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_fri_1_2);
		
		$rowsTeacher_fri_2_4= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=5
										  AND tadt.`time_id`=5');
		$option_teacher_fri_2_4 = array(""=>"Please Select Subject");
		if($rowsTeacher_fri_2_4) {
			foreach($rowsTeacher_fri_2_4 as $teacher_fri_2_4) $option_teacher_fri_2_4[$teacher_fri_2_4['teacher_id']]=$teacher_fri_2_4['teacher_name'];
		}
		$teacher_fri_2_4 = new Zend_Form_Element_Select("teacher_fri_2_4");
		$teacher_fri_2_4->setMultiOptions($option_teacher_fri_2_4);
		$teacher_fri_2_4->setValue(0);
		$teacher_fri_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_fri_2_4);
		
		$rowsTeacher_fri_4_5= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=5
										  AND tadt.`time_id`=6');
		$option_teacher_fri_4_5 = array(""=>"Please Select Subject");
		if($rowsTeacher_fri_4_5) {
			foreach($rowsTeacher_fri_4_5 as $teacher_fri_4_5) $option_teacher_fri_4_5[$teacher_fri_4_5['teacher_id']]=$teacher_fri_4_5['teacher_name'];
		}
		$teacher_fri_4_5 = new Zend_Form_Element_Select("teacher_fri_4_5");
		$teacher_fri_4_5->setMultiOptions($option_teacher_fri_4_5);
		$teacher_fri_4_5->setValue(0);
		$teacher_fri_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_fri_4_5);
		
		$rowsTeacher_fri_5_7= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=5
										  AND tadt.`time_id`=7');
		$option_teacher_fri_5_7 = array(""=>"Please Select Subject");
		if($rowsTeacher_fri_5_7) {
			foreach($rowsTeacher_fri_5_7 as $teacher_fri_5_7) $option_teacher_fri_5_7[$teacher_fri_5_7['teacher_id']]=$teacher_fri_5_7['teacher_name'];
		}
		$teacher_fri_5_7 = new Zend_Form_Element_Select("teacher_fri_5_7");
		$teacher_fri_5_7->setMultiOptions($option_teacher_fri_5_7);
		$teacher_fri_5_7->setValue(0);
		$teacher_fri_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_fri_5_7);
		
		$rowsTeacher_fri_7_8_1= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=5
										  AND tadt.`time_id`=8');
		$option_teacher_fri_7_8_1 = array(""=>"Please Select Subject");
		if($rowsTeacher_fri_7_8_1) {
			foreach($rowsTeacher_fri_7_8_1 as $teacher_fri_7_8_1) $option_teacher_fri_7_8_1[$teacher_fri_7_8_1['teacher_id']]=$teacher_fri_7_8_1['teacher_name'];
		}
		$teacher_fri_7_8_1 = new Zend_Form_Element_Select("teacher_fri_7_8_1");
		$teacher_fri_7_8_1->setMultiOptions($option_teacher_fri_7_8_1);
		$teacher_fri_7_8_1->setValue(0);
		$teacher_fri_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_fri_7_8_1);
		
		//satturday
		
		$rowsTeacher_sat_7_8= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=6
										  AND tadt.`time_id`=1');
		$option_teacher_sat_7_8 = array(""=>"Please Select Subject");
		if($rowsTeacher_sat_7_8) {
			foreach($rowsTeacher_sat_7_8 as $teacher_sat_7_8) $option_teacher_sat_7_8[$teacher_sat_7_8['teacher_id']]=$teacher_sat_7_8['teacher_name'];
		}
		$teacher_sat_7_8 = new Zend_Form_Element_Select("teacher_sat_7_8");
		$teacher_sat_7_8->setMultiOptions($option_teacher_sat_7_8);
		$teacher_sat_7_8->setValue(0);
		$teacher_sat_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sat_7_8);
		
		$rowsTeacher_sat_8_10= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=6
										  AND tadt.`time_id`=2');
		$option_teacher_sat_8_10 = array(""=>"Please Select Subject");
		if($rowsTeacher_sat_8_10) {
			foreach($rowsTeacher_sat_8_10 as $teacher_sat_8_10) $option_teacher_sat_8_10[$teacher_sat_8_10['teacher_id']]=$teacher_sat_8_10['teacher_name'];
		}
		$teacher_sat_8_10 = new Zend_Form_Element_Select("teacher_sat_8_10");
		$teacher_sat_8_10->setMultiOptions($option_teacher_sat_8_10);
		$teacher_sat_8_10->setValue(0);
		$teacher_sat_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sat_8_10);
		
		$rowsTeacher_sat_10_12= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=6
										  AND tadt.`time_id`=3');
		$option_teacher_sat_10_12 = array(""=>"Please Select Subject");
		if($rowsTeacher_sat_10_12) {
			foreach($rowsTeacher_sat_10_12 as $teacher_sat_10_12) $option_teacher_sat_10_12[$teacher_sat_10_12['teacher_id']]=$teacher_sat_10_12['teacher_name'];
		}
		$teacher_sat_10_12 = new Zend_Form_Element_Select("teacher_sat_10_12");
		$teacher_sat_10_12->setMultiOptions($option_teacher_sat_10_12);
		$teacher_sat_10_12->setValue(0);
		$teacher_sat_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sat_10_12);
		
		
		$rowsTeacher_sat_1_2= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=6
										  AND tadt.`time_id`=4');
		$option_teacher_sat_1_2 = array(""=>"Please Select Subject");
		if($rowsTeacher_sat_1_2) {
			foreach($rowsTeacher_sat_1_2 as $teacher_sat_1_2) $option_teacher_sat_1_2[$teacher_sat_1_2['teacher_id']]=$teacher_sat_1_2['teacher_name'];
		}
		$teacher_sat_1_2 = new Zend_Form_Element_Select("teacher_sat_1_2");
		$teacher_sat_1_2->setMultiOptions($option_teacher_sat_1_2);
		$teacher_sat_1_2->setValue(0);
		$teacher_sat_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sat_1_2);
		
		$rowsTeacher_sat_2_4= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=6
										  AND tadt.`time_id`=5');
		$option_teacher_sat_2_4 = array(""=>"Please Select Subject");
		if($rowsTeacher_sat_2_4) {
			foreach($rowsTeacher_sat_2_4 as $teacher_sat_2_4) $option_teacher_sat_2_4[$teacher_sat_2_4['teacher_id']]=$teacher_sat_2_4['teacher_name'];
		}
		$teacher_sat_2_4 = new Zend_Form_Element_Select("teacher_sat_2_4");
		$teacher_sat_2_4->setMultiOptions($option_teacher_sat_2_4);
		$teacher_sat_2_4->setValue(0);
		$teacher_sat_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sat_2_4);
		
		$rowsTeacher_sat_4_5= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=6
										  AND tadt.`time_id`=6');
		$option_teacher_sat_4_5 = array(""=>"Please Select Subject");
		if($rowsTeacher_sat_4_5) {
			foreach($rowsTeacher_sat_4_5 as $teacher_sat_4_5) $option_teacher_sat_4_5[$teacher_sat_4_5['teacher_id']]=$teacher_sat_4_5['teacher_name'];
		}
		$teacher_sat_4_5 = new Zend_Form_Element_Select("teacher_sat_4_5");
		$teacher_sat_4_5->setMultiOptions($option_teacher_sat_4_5);
		$teacher_sat_4_5->setValue(0);
		$teacher_sat_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sat_4_5);
		
		$rowsTeacher_sat_5_7= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=6
										  AND tadt.`time_id`=7');
		$option_teacher_sat_5_7 = array(""=>"Please Select Subject");
		if($rowsTeacher_sat_5_7) {
			foreach($rowsTeacher_sat_5_7 as $teacher_sat_5_7) $option_teacher_sat_5_7[$teacher_sat_5_7['teacher_id']]=$teacher_sat_5_7['teacher_name'];
		}
		$teacher_sat_5_7 = new Zend_Form_Element_Select("teacher_sat_5_7");
		$teacher_sat_5_7->setMultiOptions($option_teacher_sat_5_7);
		$teacher_sat_5_7->setValue(0);
		$teacher_sat_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sat_5_7);
		
		$rowsTeacher_sat_7_8_1= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=6
										  AND tadt.`time_id`=8');
		$option_teacher_sat_7_8_1 = array(""=>"Please Select Subject");
		if($rowsTeacher_sat_7_8_1) {
			foreach($rowsTeacher_sat_7_8_1 as $teacher_sat_7_8_1) $option_teacher_sat_7_8_1[$teacher_sat_7_8_1['teacher_id']]=$teacher_sat_7_8_1['teacher_name'];
		}
		$teacher_sat_7_8_1 = new Zend_Form_Element_Select("teacher_sat_7_8_1");
		$teacher_sat_7_8_1->setMultiOptions($option_teacher_sat_7_8_1);
		$teacher_sat_7_8_1->setValue(0);
		$teacher_sat_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sat_7_8_1);
		
		// sunday
		
		$rowsTeacher_sun_7_8= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=7
										  AND tadt.`time_id`=1');
		$option_teacher_sun_7_8 = array(""=>"Please Select Subject");
		if($rowsTeacher_sun_7_8) {
			foreach($rowsTeacher_sun_7_8 as $teacher_sun_7_8) $option_teacher_sun_7_8[$teacher_sun_7_8['teacher_id']]=$teacher_sun_7_8['teacher_name'];
		}
		$teacher_sun_7_8 = new Zend_Form_Element_Select("teacher_sun_7_8");
		$teacher_sun_7_8->setMultiOptions($option_teacher_sun_7_8);
		$teacher_sun_7_8->setValue(0);
		$teacher_sun_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sun_7_8);
		
		$rowsTeacher_sun_8_10= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=7
										  AND tadt.`time_id`=2');
		$option_teacher_sun_8_10 = array(""=>"Please Select Subject");
		if($rowsTeacher_sun_8_10) {
			foreach($rowsTeacher_sun_8_10 as $teacher_sun_8_10) $option_teacher_sun_8_10[$teacher_sun_8_10['teacher_id']]=$teacher_sun_8_10['teacher_name'];
		}
		$teacher_sun_8_10 = new Zend_Form_Element_Select("teacher_sun_8_10");
		$teacher_sun_8_10->setMultiOptions($option_teacher_sun_8_10);
		$teacher_sun_8_10->setValue(0);
		$teacher_sun_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sun_8_10);
		
		$rowsTeacher_sun_10_12= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=7
										  AND tadt.`time_id`=3');
		$option_teacher_sun_10_12 = array(""=>"Please Select Subject");
		if($rowsTeacher_sun_10_12) {
			foreach($rowsTeacher_sun_10_12 as $teacher_sun_10_12) $option_teacher_sun_10_12[$teacher_sun_10_12['teacher_id']]=$teacher_sun_10_12['teacher_name'];
		}
		$teacher_sun_10_12 = new Zend_Form_Element_Select("teacher_sun_10_12");
		$teacher_sun_10_12->setMultiOptions($option_teacher_sun_10_12);
		$teacher_sun_10_12->setValue(0);
		$teacher_sun_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sun_10_12);
		
		
		$rowsTeacher_sun_1_2= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=7
										  AND tadt.`time_id`=4');
		$option_teacher_sun_1_2 = array(""=>"Please Select Subject");
		if($rowsTeacher_sun_1_2) {
			foreach($rowsTeacher_sun_1_2 as $teacher_sun_1_2) $option_teacher_sun_1_2[$teacher_sun_1_2['teacher_id']]=$teacher_sun_1_2['teacher_name'];
		}
		$teacher_sun_1_2 = new Zend_Form_Element_Select("teacher_sat_1_2");
		$teacher_sun_1_2->setMultiOptions($option_teacher_sat_1_2);
		$teacher_sun_1_2->setValue(0);
		$teacher_sun_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sun_1_2);
		
		$rowsTeacher_sun_2_4= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=7
										  AND tadt.`time_id`=5');
		$option_teacher_sun_2_4 = array(""=>"Please Select Subject");
		if($rowsTeacher_sun_2_4) {
			foreach($rowsTeacher_sun_2_4 as $teacher_sun_2_4) $option_teacher_sun_2_4[$teacher_sun_2_4['teacher_id']]=$teacher_sun_2_4['teacher_name'];
		}
		$teacher_sun_2_4 = new Zend_Form_Element_Select("teacher_sun_2_4");
		$teacher_sun_2_4->setMultiOptions($option_teacher_sun_2_4);
		$teacher_sun_2_4->setValue(0);
		$teacher_sun_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sun_2_4);
		
		$rowsTeacher_sun_4_5= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=7
										  AND tadt.`time_id`=6');
		$option_teacher_sun_4_5 = array(""=>"Please Select Subject");
		if($rowsTeacher_sun_4_5) {
			foreach($rowsTeacher_sun_4_5 as $teacher_sun_4_5) $option_teacher_sun_4_5[$teacher_sun_4_5['teacher_id']]=$teacher_sun_4_5['teacher_name'];
		}
		$teacher_sun_4_5 = new Zend_Form_Element_Select("teacher_sun_4_5");
		$teacher_sun_4_5->setMultiOptions($option_teacher_sun_4_5);
		$teacher_sun_4_5->setValue(0);
		$teacher_sun_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sun_4_5);
		
		$rowsTeacher_sun_5_7= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=7
										  AND tadt.`time_id`=7');
		$option_teacher_sun_5_7 = array(""=>"Please Select Subject");
		if($rowsTeacher_sun_5_7) {
			foreach($rowsTeacher_sun_5_7 as $teacher_sun_5_7) $option_teacher_sun_5_7[$teacher_sun_5_7['teacher_id']]=$teacher_sun_5_7['teacher_name'];
		}
		$teacher_sun_5_7 = new Zend_Form_Element_Select("teacher_sun_5_7");
		$teacher_sun_5_7->setMultiOptions($option_teacher_sun_5_7);
		$teacher_sun_5_7->setValue(0);
		$teacher_sun_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sun_5_7);
		
		$rowsTeacher_sun_7_8_1= $db->getGlobalDb('SELECT
										  t.`teacher_id`,
										  t.`teacher_name`
										FROM
										  tbl_teacher AS t,
										  tbl_teach_in AS tin ,
										  tbl_teaching AS ti,
										  tbl_teacher_available_day_time AS tadt
										WHERE t.`teacher_id` = tin.`teacher_id`
										  AND tin.`dpt_id` = 5
										  AND t.`teacher_id`= ti.`teacher_id`
										  AND ti.`subject_id`=5
										  AND t.`teacher_id`=tadt.`t_id`
										  AND tadt.`day_id`=7
										  AND tadt.`time_id`=8');
		$option_teacher_sun_7_8_1 = array(""=>"Please Select Subject");
		if($rowsTeacher_sun_7_8_1) {
			foreach($rowsTeacher_sun_7_8_1 as $teacher_sun_7_8_1) $option_teacher_sun_7_8_1[$teacher_sun_7_8_1['teacher_id']]=$teacher_sun_7_8_1['teacher_name'];
		}
		$teacher_sun_7_8_1 = new Zend_Form_Element_Select("teacher_sun_7_8_1");
		$teacher_sun_7_8_1->setMultiOptions($option_teacher_sun_7_8_1);
		$teacher_sun_7_8_1->setValue(0);
		$teacher_sun_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($teacher_sun_7_8_1);
		
		//Room
		//monday
		$room_mon_7_8 = new Zend_Form_Element_Select("room_mon_7_8");
		$room_mon_7_8->setMultiOptions($option_room);
		$room_mon_7_8->setValue(0);
		$room_mon_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_mon_7_8);
		
		$room_mon_8_10 = new Zend_Form_Element_Select("room_mon_8_10");
		$room_mon_8_10->setMultiOptions($option_room);
		$room_mon_8_10->setValue(0);
		$room_mon_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_mon_8_10);
		
		$room_mon_10_12 = new Zend_Form_Element_Select("room_mon_10_12");
		$room_mon_10_12->setMultiOptions($option_room);
		$room_mon_10_12->setValue(0);
		$room_mon_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_mon_10_12);
		
		$room_mon_1_2 = new Zend_Form_Element_Select("room_mon_1_2");
		$room_mon_1_2->setMultiOptions($option_room);
		$room_mon_1_2->setValue(0);
		$room_mon_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_mon_1_2);
		
		$room_mon_2_4 = new Zend_Form_Element_Select("room_mon_2_4");
		$room_mon_2_4->setMultiOptions($option_room);
		$room_mon_2_4->setValue(0);
		$room_mon_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_mon_2_4);
		
		$room_mon_4_5 = new Zend_Form_Element_Select("room_mon_4_5");
		$room_mon_4_5->setMultiOptions($option_room);
		$room_mon_4_5->setValue(0);
		$room_mon_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_mon_4_5);
		
		$room_mon_5_7 = new Zend_Form_Element_Select("room_mon_5_7");
		$room_mon_5_7->setMultiOptions($option_room);
		$room_mon_5_7->setValue(0);
		$room_mon_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_mon_5_7);
		
		$room_mon_7_8_1 = new Zend_Form_Element_Select("room_mon_7_8_1");
		$room_mon_7_8_1->setMultiOptions($option_room);
		$room_mon_7_8_1->setValue(0);
		$room_mon_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_mon_7_8_1);
		
		//turesday
		$room_tue_7_8 = new Zend_Form_Element_Select("room_tue_7_8");
		$room_tue_7_8->setMultiOptions($option_room);
		$room_tue_7_8->setValue(0);
		$room_tue_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_tue_7_8);
		
		$room_tue_8_10 = new Zend_Form_Element_Select("room_tue_8_10");
		$room_tue_8_10->setMultiOptions($option_room);
		$room_tue_8_10->setValue(0);
		$room_tue_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_tue_8_10);
		
		$room_tue_10_12 = new Zend_Form_Element_Select("room_tue_10_12");
		$room_tue_10_12->setMultiOptions($option_room);
		$room_tue_10_12->setValue(0);
		$room_tue_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_tue_10_12);
		
		$room_tue_1_2 = new Zend_Form_Element_Select("room_tue_1_2");
		$room_tue_1_2->setMultiOptions($option_room);
		$room_tue_1_2->setValue(0);
		$room_tue_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_tue_1_2);
		
		$room_tue_2_4 = new Zend_Form_Element_Select("room_tue_2_4");
		$room_tue_2_4->setMultiOptions($option_room);
		$room_tue_2_4->setValue(0);
		$room_tue_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_tue_2_4);
		
		$room_tue_4_5 = new Zend_Form_Element_Select("room_tue_4_5");
		$room_tue_4_5->setMultiOptions($option_room);
		$room_tue_4_5->setValue(0);
		$room_tue_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_tue_4_5);
		
		$room_tue_5_7 = new Zend_Form_Element_Select("room_tue_5_7");
		$room_tue_5_7->setMultiOptions($option_room);
		$room_tue_5_7->setValue(0);
		$room_tue_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_tue_5_7);
		
		$room_tue_7_8_1 = new Zend_Form_Element_Select("room_tue_7_8_1");
		$room_tue_7_8_1->setMultiOptions($option_room);
		$room_tue_7_8_1->setValue(0);
		$room_tue_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_tue_7_8_1);
		
		//wednesday
		
		$room_wed_7_8 = new Zend_Form_Element_Select("room_wed_7_8");
		$room_wed_7_8->setMultiOptions($option_room);
		$room_wed_7_8->setValue(0);
		$room_wed_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_wed_7_8);
		
		$room_wed_8_10 = new Zend_Form_Element_Select("room_wed_8_10");
		$room_wed_8_10->setMultiOptions($option_room);
		$room_wed_8_10->setValue(0);
		$room_wed_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_wed_8_10);
		
		$room_wed_10_12 = new Zend_Form_Element_Select("room_wed_10_12");
		$room_wed_10_12->setMultiOptions($option_room);
		$room_wed_10_12->setValue(0);
		$room_wed_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_wed_10_12);
		
		$room_wed_1_2 = new Zend_Form_Element_Select("room_wed_1_2");
		$room_wed_1_2->setMultiOptions($option_room);
		$room_wed_1_2->setValue(0);
		$room_wed_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_wed_1_2);
		
		$room_wed_2_4 = new Zend_Form_Element_Select("room_wed_2_4");
		$room_wed_2_4->setMultiOptions($option_room);
		$room_wed_2_4->setValue(0);
		$room_wed_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_wed_2_4);
		
		$room_wed_4_5 = new Zend_Form_Element_Select("room_wed_4_5");
		$room_wed_4_5->setMultiOptions($option_room);
		$room_wed_4_5->setValue(0);
		$room_wed_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_wed_4_5);
		
		$room_wed_5_7 = new Zend_Form_Element_Select("room_wed_5_7");
		$room_wed_5_7->setMultiOptions($option_room);
		$room_wed_5_7->setValue(0);
		$room_wed_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_wed_5_7);
		
		$room_wed_7_8_1 = new Zend_Form_Element_Select("room_wed_7_8_1");
		$room_wed_7_8_1->setMultiOptions($option_room);
		$room_wed_7_8_1->setValue(0);
		$room_wed_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_wed_7_8_1);
		
		// thurday
		
		$room_thu_7_8 = new Zend_Form_Element_Select("room_thu_7_8");
		$room_thu_7_8->setMultiOptions($option_room);
		$room_thu_7_8->setValue(0);
		$room_thu_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_thu_7_8);
		
		$room_thu_8_10 = new Zend_Form_Element_Select("room_thu_8_10");
		$room_thu_8_10->setMultiOptions($option_room);
		$room_thu_8_10->setValue(0);
		$room_thu_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_thu_8_10);
		
		$room_thu_10_12 = new Zend_Form_Element_Select("room_thu_10_12");
		$room_thu_10_12->setMultiOptions($option_room);
		$room_thu_10_12->setValue(0);
		$room_thu_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_thu_10_12);
		
		$room_thu_1_2 = new Zend_Form_Element_Select("room_thu_1_2");
		$room_thu_1_2->setMultiOptions($option_room);
		$room_thu_1_2->setValue(0);
		$room_thu_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_thu_1_2);
		
		$room_thu_2_4 = new Zend_Form_Element_Select("room_thu_2_4");
		$room_thu_2_4->setMultiOptions($option_room);
		$room_thu_2_4->setValue(0);
		$room_thu_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_thu_2_4);
		
		$room_thu_4_5 = new Zend_Form_Element_Select("room_thu_4_5");
		$room_thu_4_5->setMultiOptions($option_room);
		$room_thu_4_5->setValue(0);
		$room_thu_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_thu_4_5);
		
		$room_thu_5_7 = new Zend_Form_Element_Select("room_thu_5_7");
		$room_thu_5_7->setMultiOptions($option_room);
		$room_thu_5_7->setValue(0);
		$room_thu_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_thu_5_7);
		
		$room_thu_7_8_1 = new Zend_Form_Element_Select("room_thu_7_8_1");
		$room_thu_7_8_1->setMultiOptions($option_room);
		$room_thu_7_8_1->setValue(0);
		$room_thu_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_thu_7_8_1);
		
		//friday
		$room_fri_7_8 = new Zend_Form_Element_Select("room_fri_7_8");
		$room_fri_7_8->setMultiOptions($option_room);
		$room_fri_7_8->setValue(0);
		$room_fri_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_fri_7_8);
		
		$room_fri_8_10 = new Zend_Form_Element_Select("room_fri_8_10");
		$room_fri_8_10->setMultiOptions($option_room);
		$room_fri_8_10->setValue(0);
		$room_fri_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_fri_8_10);
		
		$room_fri_10_12 = new Zend_Form_Element_Select("room_fri_10_12");
		$room_fri_10_12->setMultiOptions($option_room);
		$room_fri_10_12->setValue(0);
		$room_fri_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_fri_10_12);
		
		$room_fri_1_2 = new Zend_Form_Element_Select("room_fri_1_2");
		$room_fri_1_2->setMultiOptions($option_room);
		$room_fri_1_2->setValue(0);
		$room_fri_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_fri_1_2);
		
		$room_fri_2_4 = new Zend_Form_Element_Select("room_fri_2_4");
		$room_fri_2_4->setMultiOptions($option_room);
		$room_fri_2_4->setValue(0);
		$room_fri_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_fri_2_4);
		
		$room_fri_4_5 = new Zend_Form_Element_Select("room_fri_4_5");
		$room_fri_4_5->setMultiOptions($option_room);
		$room_fri_4_5->setValue(0);
		$room_fri_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_fri_4_5);
		
		$room_fri_5_7 = new Zend_Form_Element_Select("room_fri_5_7");
		$room_fri_5_7->setMultiOptions($option_room);
		$room_fri_5_7->setValue(0);
		$room_fri_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_fri_5_7);
		
		$room_fri_7_8_1 = new Zend_Form_Element_Select("room_fri_7_8_1");
		$room_fri_7_8_1->setMultiOptions($option_room);
		$room_fri_7_8_1->setValue(0);
		$room_fri_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_fri_7_8_1);
		
		//saturday
		
		$room_sat_7_8 = new Zend_Form_Element_Select("room_sat_7_8");
		$room_sat_7_8->setMultiOptions($option_room);
		$room_sat_7_8->setValue(0);
		$room_sat_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sat_7_8);
		
		$room_sat_8_10 = new Zend_Form_Element_Select("room_sat_8_10");
		$room_sat_8_10->setMultiOptions($option_room);
		$room_sat_8_10->setValue(0);
		$room_sat_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sat_8_10);
		
		$room_sat_10_12 = new Zend_Form_Element_Select("room_sat_10_12");
		$room_sat_10_12->setMultiOptions($option_room);
		$room_sat_10_12->setValue(0);
		$room_sat_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sat_10_12);
		
		$room_sat_1_2 = new Zend_Form_Element_Select("room_sat_1_2");
		$room_sat_1_2->setMultiOptions($option_room);
		$room_sat_1_2->setValue(0);
		$room_sat_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sat_1_2);
		
		$room_sat_2_4 = new Zend_Form_Element_Select("room_sat_2_4");
		$room_sat_2_4->setMultiOptions($option_room);
		$room_sat_2_4->setValue(0);
		$room_sat_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sat_2_4);
		
		$room_sat_4_5 = new Zend_Form_Element_Select("room_sat_4_5");
		$room_sat_4_5->setMultiOptions($option_room);
		$room_sat_4_5->setValue(0);
		$room_sat_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sat_4_5);
		
		$room_sat_5_7 = new Zend_Form_Element_Select("room_sat_5_7");
		$room_sat_5_7->setMultiOptions($option_room);
		$room_sat_5_7->setValue(0);
		$room_sat_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sat_5_7);
		
		$room_sat_7_8_1 = new Zend_Form_Element_Select("room_sat_7_8_1");
		$room_sat_7_8_1->setMultiOptions($option_room);
		$room_sat_7_8_1->setValue(0);
		$room_sat_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sat_7_8_1);
		
		//sunday
		
		$room_sun_7_8 = new Zend_Form_Element_Select("room_sun_7_8");
		$room_sun_7_8->setMultiOptions($option_room);
		$room_sun_7_8->setValue(0);
		$room_sun_7_8->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sun_7_8);
		
		$room_sun_8_10 = new Zend_Form_Element_Select("room_sun_8_10");
		$room_sun_8_10->setMultiOptions($option_room);
		$room_sun_8_10->setValue(0);
		$room_sun_8_10->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sun_8_10);
		
		$room_sun_10_12 = new Zend_Form_Element_Select("room_sun_10_12");
		$room_sun_10_12->setMultiOptions($option_room);
		$room_sun_10_12->setValue(0);
		$room_sun_10_12->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sun_10_12);
		
		$room_sun_1_2 = new Zend_Form_Element_Select("room_sun_1_2");
		$room_sun_1_2->setMultiOptions($option_room);
		$room_sun_1_2->setValue(0);
		$room_sun_1_2->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sun_1_2);
		
		$room_sun_2_4 = new Zend_Form_Element_Select("room_sun_2_4");
		$room_sun_2_4->setMultiOptions($option_room);
		$room_sun_2_4->setValue(0);
		$room_sun_2_4->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sun_2_4);
		
		$room_sun_4_5 = new Zend_Form_Element_Select("room_sun_4_5");
		$room_sun_4_5->setMultiOptions($option_room);
		$room_sun_4_5->setValue(0);
		$room_sun_4_5->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sun_4_5);
		
		$room_sun_5_7 = new Zend_Form_Element_Select("room_sun_5_7");
		$room_sun_5_7->setMultiOptions($option_room);
		$room_sun_5_7->setValue(0);
		$room_sun_5_7->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sun_5_7);
		
		$room_sun_7_8_1 = new Zend_Form_Element_Select("room_sun_7_8_1");
		$room_sun_7_8_1->setMultiOptions($option_room);
		$room_sun_7_8_1->setValue(0);
		$room_sun_7_8_1->setAttribs(array("class"=>"form-control"));
		$this->addElement($room_sun_7_8_1);
		
		$valid_date = new Zend_Form_Element_Text("valid_date");
		$create_date = new Zend_Form_Element_Text("create_date");
		
		$rowsfac= $db->getGlobalDb('SELECT
									  f.`fac_name`,
									  f.`fac_id`
									FROM
									  tbl_faculty AS f
									WHERE f.`fac_name` != ""
									ORDER BY f.`fac_name` ASC ');
		$option_fac = array(""=>"--Please Select Faculty--");
		if($rowsfac) {
			foreach($rowsfac as $readfac) $option_fac[$readfac['fac_id']]=$readfac['fac_name'];
		}
		$fac = new Zend_Form_Element_Select("facuty");
		$fac->setMultiOptions($option_fac);
		$fac->setAttribs(array("class"=>"form-control"));
		$this->addElement($fac);
		
		$rowsDpt= $db->getGlobalDb('SELECT 
									  dpt.`dpt_id`,
									  dpt.`dpt_name`
									FROM
									  tbl_departments AS dpt,
									  tbl_faculty AS f
									WHERE dpt.`dpt_name` != "" 
									AND dpt.`fac_id`=f.`fac_id`
									ORDER BY dpt.`dpt_name` ASC  ');
		$option_dpt = array(""=>"--Please Select Department--");
		if($rowsDpt) {
			foreach($rowsDpt as $readdpt) $option_dpt[$readdpt['dpt_id']]=$readdpt['dpt_name'];
		}
		$dpt = new Zend_Form_Element_Select("deparment");
		$dpt->setMultiOptions($option_dpt);
		$dpt->setAttribs(array("class"=>"form-control","onChange"=>"getSubjectFilter();"));
		$this->addElement($dpt);
		
		$submit = new Zend_Form_Element_Submit("save");
		$submit->setAttribs(array("class"=>"form-control"));
		$this->addElement($submit);
		
		$this->addElements(array($academic_year,$level,$year,$semester,$session,$room_pri,$valid_date,$create_date));
		
		return $this;
	}

}

